package com.zhenming.mirror.util;

/**
 *
 * @author jisx
 * @date 2017/7/20
 */
public enum CodeEnum {

    /**
     * 系统异常导致的失败
     */
    FAIL(-1,"请联系管理员"),
    SUCCESS(200,"请求成功"),

    /*用户code*/
    _6000(6000, "userId不正确"),
    _6001(6001, "userName不正确"),
    _6002(6002, "用户已存在"),
    _6003(6003, "用户不存在"),

    /*角色code*/
    _6100(6100, "角色不存在"),
    _6101(6101, "roleId不正确"),
    _6102(6102, "roleId不正确"),
    _6103(6103, "roleName不正确"),
    _6104(6104, "roleParentId不正确"),
    _6105(6105, "roleParentId不存在"),
    _6106(6106, "roleId与roleParentId冲突"),

    /*分类code*/
    _6200(6200, "categoryId不正确"),
    _6201(6201, "categoryParentId不正确"),
    _6202(6202, "分类不存在"),
    _6203(6203, "分类已存在"),
    _6204(6204, "categoryName不正确"),
    _6205(6205, "categoryParentId不存在"),
    _6206(6206, "categoryId与categoryParentId冲突"),

    /*产品code*/
    _6300(6300, "productId不能为null"),
    _6301(6301, "找不到产品"),
    _6302(6302, "productName不能为null"),
    _6303(6303, "categoryId不能为null"),
    _6304(6304, "productUnit不能为null"),
    ;

    int code;

    String message;
    CodeEnum(int code,String message){
        this.code  = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
